/*
 * Copyright (c) 2016. For Intelligent Group.
 */

package com.intelligent.ispc.core.service;


import com.intelligent.ispc.core.dto.*;

import java.util.List;

/**
 * Created by Julia.Zhou on 2016/08/16.
 */
public interface GrrService {

    /**
     * Search grr group.
     *
     * @param filePath  source file path
     * @return the data dto
     */
    GrrGroupDto searchGroupSearchKeys(String filePath);

    /**
     * Search grr summary and view data.
     *
     * @param grrParamDto  grr params
     * @param groupSearchKey every group value and key
     * @return the data dto
     */
    GrrMainResultDto searchGrrMainResult(GrrParamDto grrParamDto, GrrGroupDto groupSearchKey);

    /**
     * Search grr summary.
     *
     * @param grrParamDto  grr params
     * @param groupSearchKey every group value and key
     * @param start the start position
     * @param end the end position
     * @return the data dtos
     */
    List<GrrSummaryDto> searchGrrSummary(GrrParamDto grrParamDto, GrrGroupDto groupSearchKey, int start, int end);

    /**
     * Search grr view data.
     *
     * @param grrParamDto  grr params
     * @param groupSearchKey every group value and key
     * @param start the start position
     * @param end the end position
     * @return the data dtos
     */
    List<GrrViewDataDto> searchGrrViewData(GrrParamDto grrParamDto, GrrGroupDto groupSearchKey, int start, int end);

    /**
     * Search grr result.
     *
     * @param grrParamDto  grr params
     * @param groupSearchKey every group value and key
     * @param grrViewDataDtos checked grr view data dtos
     * @return the data dto
     */
    GrrResultDto searchGrrResult(GrrParamDto grrParamDto, GrrGroupDto groupSearchKey, List<GrrViewDataDto> grrViewDataDtos);

    /**
     * Export grr summary.
     *
     * @param grrParamDto  grr params
     * @param groupSearchKey every group value and key
     * @param itemNames checked item names
     * @return the export file path
     */
    String exportSummary(GrrParamDto grrParamDto, GrrGroupDto groupSearchKey, List<String> itemNames);

    /**
     * Export grr summary and detail.
     *
     * @param grrParamDto  grr params
     * @param groupSearchKey every group value and key
     * @param itemNames checked item names
     * @return the export file path
     */
    String exportSummaryAndDetail(GrrParamDto grrParamDto, GrrGroupDto groupSearchKey, List<String> itemNames);

    /**
     * Update grr view data.
     *
     * @param grrParamDto  grr params
     * @param groupSearchKey every group value and key
     */
    void updateGrrViewDatas(GrrParamDto grrParamDto, GrrGroupDto groupSearchKey);

}


